Skip to main content

Second Order ODEs

Previously, we discussed first-order ordinary differential equations (ODEs), which involve the first derivative of an unknown function. In this section, we will explore second-order ODEs, which involve the second derivative of an unknown function. They are ubiquitous in physics, as Newton's second law is by definition a second-order ODE.

Table of Contents

Linear Second Order ODEs

A second-order ODE is an equation that relates a function , its first derivative , and its second derivative . A perfect example of a linear second-order ODE is the equation of motion for a damped, driven harmonic oscillator:

Constant Coefficients

We shall first consider the simplest case of a linear, homogeneous second-order ODE with constant coefficients:

In such an equation, , , and are constants, and . If we make the ansatz , we can plug this into the ODE to get

Dividing both sides by , we get the characteristic equation

This yields two solutions labeled and .

The ODE obeys the principle of superposition, meaning that if and are solutions to the ODE, then any linear combination of them is also a solution. The general solution depends on the nature of the roots and of the characteristic equation.

  1. Distinct Real Roots: If the roots are real and distinct, i.e., , then the general solution is given by

    where and are constants determined by initial conditions. In a physical context, this corresponds to an overdamped harmonic oscillator, where the system returns to equilibrium without oscillating.

  2. Repeated Real Roots: If the roots are real and repeated, i.e., , then the general solution is given by

    where and are constants determined by initial conditions. In a physical context, this corresponds to a critically damped harmonic oscillator, where the system returns to equilibrium as quickly as possible without oscillating.

  3. Complex Conjugate Roots: If the roots are complex conjugates, i.e., with and , then the general solution is given by

    where and are constants determined by initial conditions. In a physical context, this corresponds to an underdamped harmonic oscillator, where the system oscillates with a gradually decreasing amplitude.

As expected, there are two independent constants for the second-order ODE, meaning that two boundary conditions are required to determine a unique solution. There are two types of these problems;

  1. An initial value problem specifies the value of the function and its first derivative (i.e. velocity) at a specific point, usually . For example, we might specify and .

  2. A boundary value problem specifies the value of the function at two different points, such as and .

Nonhomogeneous Equations

Now suppose we have a nonhomogeneous equation, i.e., . In this case, the general solution is given by the sum of the general solution to the corresponding homogeneous equation and a particular solution to the nonhomogeneous equation.

More concretely, given the nonhomogeneous equation

we first find the general solution to the corresponding homogeneous equation

given by the methods described above. The solutions to the homogeneous equation form the complementary function. To find a particular solution to the nonhomogeneous equation, we can use methods such as undetermined coefficients or variation of parameters. In the method of undetermined coefficients, we make an ansatz for based on the form of (typically using a table of common forms), and then determine the coefficients by substituting into the nonhomogeneous equation. The ansatz must be linearly independent of the homogeneous solution .

In the method of variation of parameters, we use the homogeneous solution to construct a particular solution . Suppose the complementary functions are given by and , so that the general solution to the homogeneous equation is . Then, we define the Wronskian as

Then, we can find a particular solution using the formula